package starblaze
{
	
  public final class Opcode 
  {
    
    // no-op
    public static const NOP   :uint = 0x00;
    
    // load data
    public static const LDCI  :uint = 0x01; // from constant
    public static const LDCF  :uint = 0x02; // from constant
    public static const LDVI  :uint = 0x03; // from variable
    public static const LDVF  :uint = 0x04; // from variable
    public static const LDOAI :uint = 0x05; // from output stream attribute
    public static const LDOAF :uint = 0x06; // from output stream attribute
    public static const LDIAI :uint = 0x07; // from internal stream attribute
    public static const LDIAF :uint = 0x08; // from internal stream attribute
    
    // load literal
    public static const LTI   :uint = 0x09;
    public static const LTF   :uint = 0x0A;
    
    // copy stack top
    public static const CPYI  :uint = 0x0B;
    public static const CPYF  :uint = 0x0C;
    
    // move
    public static const MOVVI :uint = 0x10; // to variable
    public static const MOVVF :uint = 0x11; // to variable
    public static const MOVOAI:uint = 0x12; // to output stream attribute
    public static const MOVOAF:uint = 0x13; // to output stream attribute
    public static const MOVIAI:uint = 0x14; // to output stream attribute
    public static const MOVIAF:uint = 0x15; // to output stream attribute
    
    // add
    public static const ADDI  :uint = 0x20;
    public static const ADDF  :uint = 0x21;
    
    // sub
    public static const SUBI  :uint = 0x22;
    public static const SUBF  :uint = 0x23;
    
    // mul
    public static const MULII :uint = 0x24;
    public static const MULIF :uint = 0x25;
    public static const MULFI :uint = 0x26;
    public static const MULFF :uint = 0x27;
    
    // div
    public static const DIVII :uint = 0x28;
    public static const DIVIF :uint = 0x29;
    public static const DIVFI :uint = 0x2A;
    public static const DIVFF :uint = 0x2B;
    
    // func
    public static const RND   :uint = 0x30;
    public static const SIN   :uint = 0x31;
    public static const COS   :uint = 0x32;
    public static const TAN   :uint = 0x33;
    public static const EXP   :uint = 0x34;
    public static const ASIN  :uint = 0x35;
    public static const ACOS  :uint = 0x36;
    public static const ATAN  :uint = 0x37;
    public static const ATAN2 :uint = 0x38;
    public static const MULQ  :uint = 0x39;
    public static const LERP  :uint = 0x3A;
    public static const SLERP :uint = 0x3B;
    
    // jump
    public static const JMP   :uint = 0x40;
    public static const JMPZI :uint = 0x41;
    public static const JMPNZI:uint = 0x42;
    public static const JMPLTI:uint = 0x43;
    public static const JMPLEI:uint = 0x44;
    public static const JMPEQI:uint = 0x45;
    public static const JMPGTI:uint = 0x46;
    public static const JMPGEI:uint = 0x47;
    public static const JMPZF :uint = 0x48;
    public static const JMPNZF:uint = 0x49;
    public static const JMPLTF:uint = 0x4A;
    public static const JMPLEF:uint = 0x4B;
    public static const JMPEQF:uint = 0x4C;
    public static const JMPGTF:uint = 0x4D;
    public static const JMPGEF:uint = 0x4E;
    
    // kill particle
    public static const KILL  :uint = 0x80;
    
  }

}
